﻿using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using MS.InformationManagement.Support.Enums;

namespace MS.InformationManagement.WP.DocumentCenter.DocumentDeliveryBagList
{
    [ToolboxItemAttribute(false)]
    public class DocumentDeliveryBagList : WebPart
    {
        [Browsable(true)]
        public DeliveryControlType ControlType { get; set; }


        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        private const string _ascxPath = @"~/_CONTROLTEMPLATES/MS.InformationManagement.WP.DocumentCenter/DocumentDeliveryBagList/DocumentDeliveryBagListUserControl.ascx";


        protected override void CreateChildControls()
        {
            DocumentDeliveryBagListUserControl control = Page.LoadControl(_ascxPath) as DocumentDeliveryBagListUserControl;
            control.ControlType = ControlType;
            Controls.Add(control);
        }
    }
}
